﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LimpaGaragem.BLL.Product
{
    public class ProductFlagged
    {
        /// <summary>
        /// Return list of product flagged from user
        /// </summary>
        /// <returns></returns>
        public List<LimpaGaragem.Model.Product.ProductFlagged> GetListOfProductFlaggedFromUser(int IDUser)
        {
            try
            {
                return new LimpaGaragem.DAO.Product.ProductFlagged().GetListOfProductFlaggedFromUser(IDUser);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        /// <summary>
        /// Return list of product flagged from product
        /// </summary>
        /// <returns></returns>
        public List<LimpaGaragem.Model.Product.ProductFlagged> GetListOfProductFlaggedFromProduct(int IDProduct)
        {
            try
            {
                return new LimpaGaragem.DAO.Product.ProductFlagged().GetListOfProductFlaggedFromProduct(IDProduct);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        /// <summary>
        /// Insert new product flagged
        /// </summary>
        public int InsertProductFlagged(int IDProductFlaggedType,
                                     int IDProduct,
                                     int IDUser,
                                     string Content)
        {
            try
            {
                return new LimpaGaragem.DAO.Product.ProductFlagged().InsertProductFlagged(IDProductFlaggedType,
                                                                                            IDProduct,
                                                                                            IDUser,
                                                                                            Content);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
}
